package objects;

import physics.*;


public class BasicShape 
{
	
	String typeOfShape, color;
	Vector position     = new Vector(), 
		   acceleration = new Vector(), 
		   velocity     = new Vector(); 
	boolean hasGravity;
	float  mass, diameter;
	double coefRestitution;

	public BasicShape(String typeOfShape, Vector initPosition, float diameter, Vector initVelocity)
	{
		
		this.typeOfShape = typeOfShape;
		this.diameter    = diameter;
		this.color       = "Black";
		position.setX(initPosition.getX());
		position.setY(initPosition.getY());
		velocity.setX(initVelocity.getX());
		velocity.setY(initVelocity.getY());
		hasGravity = true;
		findCoefOfRestitution();
		
	}
	
	public BasicShape(String typeOfShape, Vector initPosition, float diameter, Vector initVelocity, String color) {
		// TODO Auto-generated constructor stub
		this.typeOfShape = typeOfShape;
		this.diameter    = diameter;
		this.color       = color;
		position.setX(initPosition.getX());
		position.setY(initPosition.getY());
		velocity.setX(initVelocity.getX());
		velocity.setY(initVelocity.getY());
		hasGravity = true;
		findCoefOfRestitution();
		
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	private void findCoefOfRestitution() {
		// TODO Auto-generated method stub
		if (typeOfShape == "Circle")
		{
			coefRestitution = 0.75;
		}
		
	}

	public double getCoefRestitution() {
		return coefRestitution;
	}

	public void setCoefRestitution(double coefRestitution) {
		this.coefRestitution = coefRestitution;
	}

	public boolean isHasGravity() {
		return hasGravity;
	}

	public void setHasGravity(boolean hasGravity) {
		this.hasGravity = hasGravity;
	}

	public float getDiameter() {
		return diameter;
	}
	public void setDiameter(float diameter) {
		this.diameter = diameter;
	}
	public String getTypeOfShape() {
		return typeOfShape;
	}
	public void setTypeOfShape(String typeOfShape) {
		this.typeOfShape = typeOfShape;
	}
	public Vector getPosition() {
		return position;
	}
	public void setPosition(Vector position) {
		this.position = position;
	}
	public Vector getAcceleration() {
		return acceleration;
	}
	public void setAcceleration(Vector acceleration) {
		this.acceleration = acceleration;
	}
	public Vector getVelocity() {
		return velocity;
	}
	public void setVelocity(Vector velocity) {
		this.velocity = velocity;
	}
	public float getMass() {
		return mass;
	}
	public void setMass(float mass) {
		this.mass = mass;
	} 

}
